package com.example.demospringmybatisplus.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.example.demospringmybatisplus.service.MQProducerService;

/**
 * 消息管理
 *
 * @author hauhua
 * @DATE 2025/1/21
 **/
@RestController
public class MessageController {
    @Autowired
    private MQProducerService mqProducerService;

    @RequestMapping("sendMsg")
    @Transactional
    public void sendMsg(@RequestParam String topic, @RequestBody Object body) {
        mqProducerService.sendSecureMsg(topic, body,"test");
    }
}
